package com.zego.wawaji.third.share.data;

import com.zego.wawaji.base.data.BaseData;
import com.zego.wawaji.third.share.util.ShareEnum;

import org.json.JSONObject;

import java.io.Serializable;

/**
 * 分享肉容
 */
public class ShareData extends BaseData implements Serializable {
    private String title;//标题
    private String info; //内容
    private String img; //图片
    private String redirect;//跳转链接： 利用浏览器分享功能的分享链接； 复制到剪切板的分享链接；短信分享链接

    private ShareEnum shareEnum; //分享渠道

    public void parseJson(String jsonStr) {
        JSONObject jsonObject = getJsonObject(jsonStr);
        this.setImg(jsonObject.optString("Img"));
        this.setInfo(jsonObject.optString("Remark"));
        this.setRedirect(jsonObject.optString("Url"));
        this.setTitle(jsonObject.optString("Title"));
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getRedirect() {
        return redirect;
    }

    public void setRedirect(String redirect) {
        this.redirect = redirect;
    }

    public ShareEnum getShareEnum() {
        return shareEnum;
    }

    public void setShareEnum(ShareEnum shareEnum) {
        this.shareEnum = shareEnum;
    }
}
